import { request } from '@/utils/request.util';
import type { Res, ResNull } from '@/types/common';
import type { RegionTreeResponse } from '@/types/region';
import type { EnumsResponse, EnumsAndDictsData } from '@/types/enums';
import type { MedicalRecordFieldApiResponse } from '@/types/medicalRecordField';
import type { AcupointApiResponse } from '@/types/acupoint';

// 获取区域树列表
export const getRegionTreeList = () =>
  request.get<RegionTreeResponse>('/config/dict/getRegionTreeList');

// 获取系统枚举和字典
export const getEnumsList = () =>
  request.get<Res<EnumsAndDictsData>>('/config/enums/getMap');

// 获取穴位树列表
export const getAcupointTreeList = () =>
  request.get<AcupointApiResponse>('/config/dict/getAcupointTreeList');

// 查询病历字段--模板设置病历用
export const getMedicalRecordFields = () =>
  request.get<MedicalRecordFieldApiResponse>(
    '/medical/field/getMedicalFieldList'
  );  

// 文件上传
export const uploadFile = (file: any, fileName: string) => {
  return request.upload<ResNull>('/file/upload', file);
};

// 获取科室下拉框数据
export const getDeptSelectOptions = () =>
  request.get<Res<any>>('/clinic/dept/getSelectList');


//查询诊所员工下拉框数据
export const getEmp = () =>
  request.get<Res<any>>('/clinic/emp/getSelectList');

// 查询充值档位列表
export const getGearList = () =>
  request.get<Res<any>>('/member/getGearList?gearName=&pageNo=1&pageSize=1000');

//查询厂家列表
export const getManufacturerList = () =>
  request.get<Res<any>>('/stock/supply/getMfrList?mfrName=&pageNo=1&pageSize=1000');
// 查询药品列表
export const getFeeStandardListv2 = (name: string) =>
  request.get<Res<any>>('/project/fee/v2/getFeeStandardList?projectName='+name);


